package com.fduss.mazegame.core;

import com.fduss.mazegame.core.unit.Place;
import com.fduss.mazegame.core.unit.feature.Icon;

/**
 * Records the place that the icon of it need to be changed at
 * next time.
 *
 * @Author
 * @Time 2017/9/27 18:32
 */
public class Update {

    private Place place;
    private Icon icon;

    public Update(Place place, Icon icon) {
        if (place == null) {
            throw new NullPointerException("place");
        }
        if (icon == null) {
            throw new NullPointerException("icon");
        }
        this.place = place;
        this.icon = icon;
    }

    public int getRow() {
        return place.getRow();
    }

    public int getCol() {
        return place.getCol();
    }

    public Icon getIcon() {
        return icon;
    }
}
